From: Stefano Facchini Date: Sat, 11 Feb 2012 10:14:43 +0000 (+0100) Subject: Return expected type from handleDragOver for Activities button actors X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7061 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=eab4f4c963ffa5fb73aa1ec1ee9a5e859133be79;p=gnome-shell.git Return expected type from handleDragOver for Activities button actors Currently they return 'undefined' instead of something meaningful, e.g. DND.DragMotionResult.CONTINUE. This was unnoticed because none of the ancestors of the Activities button actors do any drag handling. The only visible issue are JS errors generated when dragging, for example, a window thumbnail over the button, because the cursor cannot be set. https://bugzilla.gnome.org/show_bug.cgi?id=669921 --- diff --git a/js/ui/layout.js b/js/ui/layout.js index fb808ec52..ae6ceb349 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -8,6 +8,7 @@ const Shell = imports.gi.Shell; const Signals = imports.signals; const St = imports.gi.St; +const DND = imports.ui.dnd; const Main = imports.ui.main; const Params = imports.misc.params; const ScreenSaver = imports.misc.screenSaver; @@ -490,13 +491,15 @@ const HotCorner = new Lang.Class({ handleDragOver: function(source, actor, x, y, time) { if (source != Main.xdndHandler) - return; + return DND.DragMotionResult.CONTINUE; if (!Main.overview.visible && !Main.overview.animationInProgress) { this.rippleAnimation(); Main.overview.showTemporarily(); Main.overview.beginItemDrag(actor); } + + return DND.DragMotionResult.CONTINUE; }, _onCornerEntered : function() { diff --git a/js/ui/panel.js b/js/ui/panel.js index 25f27bed1..088719a44 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -13,6 +13,7 @@ const Signals = imports.signals; const Config = imports.misc.config; const CtrlAltTab = imports.ui.ctrlAltTab; +const DND = imports.ui.dnd; const Layout = imports.ui.layout; const Overview = imports.ui.overview; const PopupMenu = imports.ui.popupMenu; @@ -660,12 +661,14 @@ const ActivitiesButton = new Lang.Class({ handleDragOver: function(source, actor, x, y, time) { if (source != Main.xdndHandler) - return; + return DND.DragMotionResult.CONTINUE; if (this._xdndTimeOut != 0) Mainloop.source_remove(this._xdndTimeOut); this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT, Lang.bind(this, this._xdndShowOverview, actor)); + + return DND.DragMotionResult.CONTINUE; }, _escapeMenuGrab: function() {